package com.dunqi.gpm.cangxi.home.fragment;

import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.dunqi.gpm.cangxi.R;
import com.dunqi.gpm.cangxi.common.base.BaseFragment;
import com.dunqi.gpm.cangxi.common.view.RecyclerItemDecoration;
import com.dunqi.gpm.cangxi.home.adapter.ProjectVerifyAdapter;
import com.dunqi.gpm.cangxi.home.bean.ProjectVerify;
import com.dunqi.gpm.cangxi.home.widget.EmptyView;

import java.util.ArrayList;

import butterknife.BindView;

/**
 * Created by 空 on 2017/11/22 0022.
 */

public class ProjectVerifyFragment extends BaseFragment {

    @BindView(R.id.recycler)
    RecyclerView recycler;
    @BindView(R.id.swipeRefresh)
    SwipeRefreshLayout swipeRefresh;

    ArrayList<ProjectVerify> data = new ArrayList<>();
    private ProjectVerifyAdapter adapter;


    @Override
    protected void refreshData(Bundle savedInstanceState) {

    }

    @Override
    protected void initUiAndListener() {
        data.add(null);
        data.add(null);
        data.add(null);
        data.add(null);
        data.add(null);

        recycler.setLayoutManager(new LinearLayoutManager(context));
        recycler.addItemDecoration(new RecyclerItemDecoration(10, RecyclerItemDecoration.VERTICAL));
        adapter = new ProjectVerifyAdapter(data);
        recycler.setAdapter(adapter);
        adapter.setEmptyView(new EmptyView(context));
    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_project_verify;
    }

}
